package com.qf.shop.service.Impl;

import com.qf.shop.mapper.CountDatabaseMapper;
import com.qf.shop.service.ICountDatabaseService;
import com.qf.shop.vo.ReturnCartCount;
import com.qf.shop.vo.ReturnCount;
import com.qf.shop.vo.ReturnPrice;
import com.qf.shop.vo.ReturnUserCount;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Transactional
@Service
public class CountDatabaseImpl implements ICountDatabaseService {

    private CountDatabaseMapper countDatabaseMapper;

    public CountDatabaseImpl(CountDatabaseMapper countDatabaseMapper) {
        this.countDatabaseMapper = countDatabaseMapper;
    }

    @Override
    public List<ReturnCount> getGoodsCount() {
        List<ReturnCount> goodsCount = countDatabaseMapper.getGoodsCount();
        return goodsCount;
    }

    @Override
    public List<ReturnPrice> getGoodsPrice() {
        List<ReturnPrice> goodsPrice = countDatabaseMapper.getGoodsPrice();
        return goodsPrice;
    }

    @Override
    public List<ReturnCartCount> getCartCount() {
        List<ReturnCartCount> cartCount = countDatabaseMapper.getCartCount();
        return cartCount;
    }

    @Override
    public List<ReturnUserCount> getUserCount() {
        List<ReturnUserCount> userCount = countDatabaseMapper.getUserCount();
        return userCount;
    }

    @Override
    public List<ReturnUserCount> getUserCount30() {
        List<ReturnUserCount> userCount30 = countDatabaseMapper.getUserCount30();
        return userCount30;
    }

    @Override
    public List<ReturnUserCount> getUserCount7() {
        List<ReturnUserCount> userCount7 = countDatabaseMapper.getUserCount7();
        return userCount7;
    }
}
